<!DOCTYPE html>
<html>
<#include "../head.html">
    <style>
        .account_type{float:left;margin-top: 3px;}
    </style>
<body>
<table class="mc">
<tr>
<td class="mc-l">
    <!--左侧导航---{-->
    <div id="navPanelContainer">
        <div class="system-logo cd"></div>
        <!--管理员信息---{-->
        <#include "../adminInfo.html">
            <!--管理员信息---}-->
            <div class="nav-wrap">
            	<!-- v1.6.6.2 RDPROJECT-238 zza 2013-10-21 start -->
                <#include "../report/left.html">
                <!-- v1.6.6.2 RDPROJECT-238 zza 2013-10-21 end -->
            </div>
    </div>
    <!--左侧导航---}-->
</td>
<td class="mc-m">
    <div class="navToggle"></div>
</td>
<td class="mc-r">
<!--顶部导航---{-->
<#include "../topNav.html">
    <!--顶部导航---}-->

    <!--面包屑导航---{-->
    <#assign moduleName="奖励统计">
        <#include "banner.html">
            <!--面包屑导航---}-->

            <!--工具栏--{-->
            <div id="toolbar" class="clearfix">
                <div class="toolbor-module export">
                    <input type="button" onclick="exportxls()" value="导出报表" class="input-button export-btn"/>
                </div>
                <#if param?exists>
                    <#if param.get("dotime1")?exists><#assign dotime1=param.get("dotime1")></#if>
                    <#if param.get("dotime2")?exists><#assign dotime2=param.get("dotime2")></#if>
                    <#if param.get("username")?exists><#assign username=param.get("username")></#if>
                    <#if param.get("awardType")?exists><#assign awardType=param.get("awardType")></#if> 
                    <#if param.get("receive_status")?exists><#assign receive_status=param.get("receive_status")></#if> 
                </#if>
                <div class="toolbor-module search">    
                    <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                </div>
                <div class="toolbor-module search">
                    <input type="text" name="username" id="username" value="请输入用户名" data-value="请输入用户名" class="search-value">
                </div>
                    <input type="hidden" name="search" value="select"> 
                <#--
                 <div class="toolbor-module search">
                    <div style="height:22px;line-height:22px;float:left;">标种：</div>
                    <#if map?exists&&map.type?exists>
						<@linkage name="type" id="type" default=map.type type="value" nid="loan_type"  noselect="没有限制"/>
					<#else>
						<@linkage name="type" id="type" type="value" nid="loan_type" noselect="没有限制"/>
					</#if>
                </div>
                -->
                <div class="toolbor-module search">
                	<div style="height:22px;line-height:22px;float:left;">类型：</div>
					<div class="select-box" id="awardType">
						<div class="tag-select">全部</div>
						<ul class="tag-options">
							<li data-value="-1">全部</li>
							<li data-value="1">充值奖励</li>
							<li data-value="2">邀请人奖励</li>
							<li data-value="3">被邀请人奖励</li>
							<li data-value="4">投标奖励</li>
							<li data-value="5">回款续投奖励</li>
							<li data-value="6">第一次投标奖励</li>
							<!-- v1.6.6.1 RDPROJECT-254 zza 2013-09-29 start -->
							<li data-value="7">推广费</li>
							<!-- v1.6.6.1 RDPROJECT-254 zza 2013-09-29 end -->
							<!-- v1.6.6.2 RDPROJECT-235 zza 2013-10-18 start -->
							<li data-value="8">推广奖励</li>
							<!-- v1.6.6.2 RDPROJECT-235 zza 2013-10-18 end -->
						</ul>
					</div>
					</div>
					<div class="toolbor-module search">
						<div style="height:22px;line-height:22px;float:left;">状态：</div>
						<div class="select-box" id="receive_status">
							<div class="tag-select">全部</div>
							<ul class="tag-options">
								<li data-value="-1">全部</li>
								<li data-value="1">未返现</li>
								<li data-value="2">已返现</li>
							</ul>
						</div>
					</div>
					<div class="toolbor-module search">
	                   	<div style="height:22px;line-height:22px;float:left;">时间：</div>
	                    <input class="_search-value" name="dotime1" id="dotime1" value="${dotime1}" size="15" onclick="change_picktime()"/>
	                    <div style="height:22px;line-height:22px;float:left;margin:0 8px;"> 到 </div>
	                    <input class="_search-value" name="dotime2" id="dotime2"  value="${dotime2}"  size="15" onclick="change_picktime()"/>
                	</div>
            </div>
            <!--工具栏--}-->

            <div id="main" class="clearfix">
                <form action="" method="post">
                    <table class="data-list">
                        <tr class="header">
                            <td>奖励类型</td>
                            <td>收到奖励者</td>
                            <td>注册会员</td>
                            <td>注册会员投资总额</td>
                            <td>应收奖励时间</td>
                            <td>实收奖励时间</td>
                            <td>应收金额</td>
                            <td>实收金额</td>
                            <td>返现状态</td>
                            <td>创建时间</td>
                            <td>结束时间</td>
                            <td>返现方式</td>
                            <td>操作</td>
                        </tr>
                        <#import "../../common/function.html" as func>
                        <!-- v1.6.6.2 zza 2013-10-21 start -->
                        <#if list??>
	                        <#list list as item>
	                            <tr class="s">
	                                <td><@func.rewardType type_id = item.type /></td>
	                                <td>${item.username!}</td>
	                                <!-- v1.6.6.1 RDPROJECT-254 zza 2013-09-29 start -->
	                                <td><#if item.type == 2 || item.type == 3 || item.type == 7>${item.passive_username!}<#else>-</#if></td>
	                                <!-- v1.6.6.2 RDPROJECT-287 zza 2013-10-23 start -->
	                                <td><#if item.tender_count == 0>-<#else>${item.tender_count!0} 元</#if></td>
	                                <!-- v1.6.6.2 RDPROJECT-287 zza 2013-10-23 end -->
	                                <!-- v1.6.6.1 RDPROJECT-254 zza 2013-09-29 end -->
	                                <td>${dateformat(item.receive_time!)}</td>
	                                <td>${dateformat(item.receive_yestime!)}</td>
	                                <td>${item.receive_account!}</td>
	                                <td>${item.receive_yesaccount!}</td>
	                                <td><@func.receiveStatus status=item.receive_status /></td>
	                                <td>${dateformat(item.addtime!)}</td>
	                                <td><#if item.endtime??>${dateformat(item.endtime)!}<#else>-</#if></td>
	                                <td><@func.back_type type_id=item.back_type /></td> 
	                                <td ><a href="viewReward.html?id=${item.id?c}">查看</a></td>
	                            </tr>
	                        </#list>
                        </#if>
                        <!-- v1.6.6.2 zza 2013-10-21 start -->
                    </table>
                </form>

                <!--底部工具栏--{-->
                <div id="bottomToolbar" class="clearfix">
                    <div class="other-tool">
                        <dl class="refresh-data">
                            <dt class="refresh-data-icon"></dt>
                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                        </dl>
                    </div>

                    <!--翻页系统--{-->
                    <div class="container">
                        <#import "../../common/page.html" as pager>
                            <@pager.pagination page=page url="/admin/reward/showAllReward.html" map=param style="style1"  />
                    </div>
                    <!--翻页系统--}-->
                </div>
                <!--底部工具栏--}-->

                <script>
                    var url = 'showAllReward.html?search=true';
                    var xlsurl = 'showAllReward.html?choiceType=export';

                    function sousuo(){
                        var sou = "";
                        var username = $("#username").val();
                        if (username!=""&&username!="请输入用户名"){
                            sou += "&username="+username;
                        }
                        var dotime1 = $("#dotime1").val();
                        var dotime2 = $("#dotime2").val();
                        if (dotime1!=null){
                            sou += "&dotime1="+dotime1;
                        }
                        if (dotime2!=null){
                            sou += "&dotime2="+dotime2;
                        }
                        var awardType = $("#awardType").find(".open-selected").attr("data-value");
                        if (awardType!="" && awardType!=null){
            				sou += "&awardType="+awardType;
            			}
            			var receive_status = $("#receive_status").find(".open-selected").attr("data-value");
                        if (receive_status!="" && receive_status!=null){
            				sou += "&receive_status="+receive_status;
            			}
                        if (sou!=""){
                            location.href=url+sou;
                        }
                    }
                    function exportxls(){
                        var sou = "";
                        var username = $("#username").val();
                        if (username!=""&&username!="请输入用户名"){
                            sou += "&username="+username;
                        }
                        var dotime1 = $("#dotime1").val();
                        var dotime2 = $("#dotime2").val();

                        if (dotime1!=null){
                            sou += "&dotime1="+dotime1;
                        }
                        if (dotime2!=null){
                            sou += "&dotime2="+dotime2;
                        }
                        var awardType = $("#awardType").find(".open-selected").attr("data-value");
                        if (awardType!="" && awardType!=null){
            				sou += "&awardType="+awardType;
            			}
            			var receive_status = $("#receive_status").find(".open-selected").attr("data-value");
                        if (receive_status!="" && receive_status!=null){
            				sou += "&receive_status="+receive_status;
            			}
                        if (sou!=""){
                            location.href=xlsurl+sou;
                        }else{
                            location.href=xlsurl;
                        }
                    }
                </script>
            </div>

</td>
</tr>
<tr>
    <!--尾部--{-->
    <td colspan="3" class="mc-b"><#include "../foot.html"></td>
    <!--尾部--}-->
</tr>
</table>

</body>
</html>
<#include "../jsPage.html">